<?php
include_once '../Controller/ConnectFB.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<!DOCTYPE html>
<html>
    <head>
        <link rel="shortcut icon" href="../icon/favicon.ico"/>
        <!--<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />-->
        <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
        <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
        <link rel="stylesheet" href="../css/myStyle.css" type="text/css" />
        <!--<link rel="stylesheet" href="/resources/demos/style.css" />-->
        <!--สีปุ่ม-->
        <link rel="stylesheet" href="../jquery/css/start/jquery-ui-1.10.1.custom.css" type="text/css" />
        <!--<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>-->
        <!--<script type="text/javascript" src="../js/jquery.fixedMenu.js"></script>-->
        <!--เมนูข้างบน-->
        <link rel="stylesheet" type="text/css" href="../css/fixedMenu_style2.css" />
<!--        <script>
        $('document').ready(function(){
            $('.menu').fixedMenu();
        });
        </script>-->

<script>
  $(function() {
        $("#createpoll")
            .button()
            .click(function( event ) {
              event.preventDefault();
              document.location.href='../Interface/MenuCreatePoll.php';
            });

            $("#answerpoll")
            .button()
            .click(function( event ) {
              event.preventDefault();
              document.location.href='../Interface/MenuAnswer.php';       
            });

            $("#statistics")
            .button()
            .click(function( event ) {
              event.preventDefault();
              document.location.href='../View/Statistics.php';    
            });

            $("#compensation")
            .button()
            .click(function( event ) {
              event.preventDefault();
              document.location.href='../View/Compensation.php';     
            });

  });

</script>
<style>
body
{
        background-image:url('../images/bg.jpg');
        background-repeat:repeat-x;
        background-color:#f8e3b7;
        
        
}
</style>
    </head>
<body>

<table border="0" width="80%" height="650px" align="center" cellpadding="5" cellspacing="1" bgcolor="#404040">
  <tr height="30px">
    <td colspan="2" bgcolor="#ffffff">
        <div class="menu">
        <ul align="left">
            <table align="left" border="0">
                <tr>
                    <td>
                        <a href="../Interface/MenuHome.php">Home</a>
                    </td>
                </tr>
            </table>
            

            <table align="left" border="0">
                <tr>
                    <td>
                <a href="../Interface/MenuCreatePoll.php">Create Poll</a>
                    </td>
                </tr>
            </table>

            <table align="left" border="0">
                <tr>
                    <td>
                <a href="../Interface/MenuAnswer.php">Answer Poll</a>
                    </td>
                </tr>
            </table>
            
            <table align="left" border="0">
                <tr>
                    <td>
                <a href="../View/Compensation.php">Compensation</a>
                    </td>
                </tr>
            </table>
            
            <table align="left" border="0">
                <tr>
                    <td>
                <a href="../View/Statistics.php">Statistics</a>
                    </td>
                </tr>
            </table>
            
           <table align="left" border="0">
                <tr>
                    <td>
                <a href="../Interface/MenuAbout.php">About</a>
                    </td>
                </tr>
            </table>
            
            <table align="left" border="0">
                <tr>
                    <td>
                <a href="../Interface/MenuContact.php">Contact</a>
                    </td>
                </tr>
            </table>
           
        </ul>
           
            <ul align="right"> 
            <?php if($fb_user){?>
               <table align="right" border="0" >
                   <tr>
                       <td>
                           <img width="25px" higth="25px"  src="https://graph.facebook.com///<?php echo $fb_user?>/picture">
                       </td>
                       <td>
                       <font color="white" size="2" align="left"><?php echo $_SESSION['strName'] ?></font>
                <a href="<?php echo $logoutUrl?>" >Logout</a>
                </table>
                <?php }else{?>
                <table align="right" border="0" >
                    <tr>
                        <td>
                    <a href="javascript:popup('<?php echo $loginUrl?>','',500,350);">Login with Facebook</a>
                        </td>
                       </tr>
                   </table>
                <?php } ?>
              </ul> 
        </div>
    </td>
        

                
               
        
  </tr>
  <tr>
    <td colspan="2" bgcolor="#ffffff" align="center">
        <table>
            <tr>
              <td><br /></td>
            </tr>
            <tr>
              <td align="center"><img  src="../images/anigif.gif" width="240" height="288" alt="" /></td>
            </tr>
            <tr>
              <td><br /></td>
            </tr>
            <tr>
              <td align="center"><font face="Arial Rounded MT Bold" size="7">QUESTIONNAIRES</font></td>
            </tr>
            <tr>
              <td><br /></td>
            </tr>
            <tr>
            <td align="center">
                            <table>
                          <tr>                      
                            <td><a id="createpoll">Create Poll</a></td>
                            <td></td>
                            <td><a id="answerpoll">Answer Poll</a></td>
                            <td></td>
                            <td><a id="compensation">Compensation</a></td>
                            <td></td>
                            <td><a id="statistics">Statistics</a></td>
                          </tr>
                        </table>
            </td>
            </tr>
        </table>
    </td>
  </tr>
</table>

</body>
</html>
